package com.sansan.qiangji.service.impl.device;

import com.sansan.qiangji.entity.device.Belt;
import com.sansan.qiangji.mapper.device.BeltMapper;
import com.sansan.qiangji.service.inter.device.BeltService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BeltServiceImpl implements BeltService {
    private BeltMapper beltMapper;

    @Resource
    public void setBeltMapper(BeltMapper beltMapper){
        this.beltMapper = beltMapper;
    }

    @Override
    public List<Belt> findAllBelt() {
        return beltMapper.findAllBelt();
    }

    @Override
    public int updateBelt(Belt belt) {
        return beltMapper.updateBelt(belt);
    }

    @Override
    public int updateBelts(List<Belt> belts) {
        return beltMapper.updateBelts(belts);
    }

    @Override
    public int addBelt(Belt belt) {
        return beltMapper.addBelt(belt);
    }

    @Override
    public List<Belt> findByBeltName(String beltName) {
        return beltMapper.findByBeltName(beltName);
    }

    @Override
    public List<Belt> findByStackerName(String stackerName) {
        return beltMapper.findByStackerName(stackerName);
    }

    @Override
    public Belt findByBeltId(Integer beltId) {
        return beltMapper.findByBeltId(beltId);
    }

    @Override
    public int deleteById(Integer beltId) {
        return beltMapper.deleteById(beltId);
    }
}
